package com.huangqi.admin;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 启动类，如果是war打包方式，必须extends SpringBootServletInitializer并复写protected SpringApplicationBuilder configure(SpringApplicationBuilder application)。
 */
@SpringBootApplication
@Controller
public class StartApplication extends SpringBootServletInitializer {

	@RequestMapping({"","index"})
	public String index(){
		return "index";
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(StartApplication.class);
	}


	public static void main(String[] args) {
		SpringApplication.run(StartApplication.class, args);
	}
}
